//
//  HYBaseViewController.h
//  HYNeiHan
//
//  Created by 上官惠阳 on 16/9/25.
//  Copyright © 2016年 上官惠阳. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface HYBaseViewController : UIViewController
- (void)pop;

- (void)popRootVc;

- (void)popToVc:(UIViewController *)vc;

- (void)dismiss;

- (void)dismissWithCompletion:(void(^)())completion;

- (void)presentVc:(UIViewController *)vc;

- (void)presentVc:(UIViewController *)vc completion:(void(^)(void))completion;

- (void)pushVc:(UIViewController *)vc;

- (void)removeChildVc:(UIViewController *)childVc;

- (void)addChildVc:(UIViewController *)childVc;

/** 加载中 **/
- (void)showLoadingAnimation;

/** 停止加载 **/
- (void)hideLoadingAnimation;

/** 请求数据，交给子类去实现 **/
- (void)loadData;

/** 检测网络连接 */
@property (assign, nonatomic) BOOL isNetworkReachable;

/** 设置导航栏右边的item*/
- (void)HY_setUpNavRightItemTitle:(NSString *)itemTitle itemImage:(NSString *)imageName handle:(void(^)(NSString *rightItemTitle))handle;

/** 设置导航栏左边的item*/
- (void)HY_setUpNavLeftItemTitle:(NSString *)itemTitle itemImage:(NSString *)imageName handle:(void(^)(NSString *leftItemTitle))handle;

/** 监听通知*/
- (void)HY_observeNotiWithNotiName:(NSString *)notiName action:(SEL)action;

/** 隐藏statusBar*/
@property (nonatomic, assign) BOOL hiddenStatusBar;

/** statusBar风格*/
@property (nonatomic, assign) UIStatusBarStyle barStyle;

/** 导航右边Item*/
@property (nonatomic, strong) UIBarButtonItem *navRightItem;

/** 导航左边Item*/
@property (nonatomic, strong) UIBarButtonItem *navLeftItem;

/** 标题*/
@property (nonatomic, copy) NSString *navItemTitle;
@end
